package com.db;

import java.util.Date;

public class ConsoleAppender implements Appender{

	private String format;
	private static ConsoleAppender appender = new ConsoleAppender();
	
	public ConsoleAppender() {
		this.format = "%d %m [%t]";
		
	}
	public static ConsoleAppender getAppender() {
		return appender;
	}
	public void append(String message) {
		String result;
		result = format.replaceAll("%d", new Date().toString()).replaceAll("%m", message).replaceAll("%t", Thread.currentThread().getName());
		System.out.println(result);
	}

}
